<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('Link/index')}">{:lang('ADMIN_LINK_INDEX')}</a></li>
        <li class="active"><a href="{:url('Link/add')}">{:lang('ADMIN_LINK_ADD')}</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="admin/links">
        <div class="form-group">
            <label for="input-name" class="col-sm-2 control-label">
                <span class="form-required">*</span>{:lang('Name')}
            </label>
            <div class="col-md-8 col-sm-10">
                <input type="text" class="form-control" id="input-name" name="name">
            </div>
        </div>
        <div class="form-group">
            <label for="input-url" class="col-sm-2 control-label">
                <span class="form-required">*</span>{:lang('Url')}
            </label>
            <div class="col-md-8 col-sm-10">
                <input type="text" class="form-control" id="input-url" name="url">
            </div>
        </div>
        <div class="form-group">
            <label for="input-image" class="col-sm-2 control-label">{:lang('Icon')}</label>
            <div class="col-md-8 col-sm-10">
                <div class="input-group">
                    <input type="text" id="input-image" name="image" class="form-control">
                    <span class="input-group-btn"><a class="btn btn-primary" href="javascript:uploadOneImage('{:lang('Upload Image')}','#input-image');">{:lang('Upload Image')}</a></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="input-target" class="col-sm-2 control-label">{:lang('Url Target')}</label>
            <div class="col-md-8 col-sm-10">
                <select class="form-control" name="target" id="input-target">
                    <foreach name="targets" item="vo">
                        <option value="{$key}">{$vo}</option>
                    </foreach>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="input-description" class="col-sm-2 control-label">{:lang('Description')}</label>
            <div class="col-md-8 col-sm-10">
                <textarea class="form-control" name="description" id="input-description"></textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary js-ajax-submit">
                    <i class="fa fa-save fa-fw"></i> {:lang('ADD')}
                </button>
                <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
</body>
</html>
